package com.chushouya.manager.constants;

import com.general.framework.core.enums.IEnum;

import java.util.Objects;

/**
 * 协议签署状态
 */
public enum PactStatusEnum implements IEnum<Integer> {

    unSign(0, "未签署"),
    signed(1, "已签署")
    ;

    private Integer value;

    private String desc;


    PactStatusEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (PactStatusEnum thisEnum : PactStatusEnum.values()) {
            if (Objects.equals(thisEnum.value, value)) {
                return thisEnum.desc;
            }
        }
        return "";
    }

    @Override
    public Integer value() {
        return this.value;
    }

    @Override
    public String named() {
        return this.desc;
    }
}
